lexer grammar STIL_Lexer;
@lexer::members{
    public static final int ON = 1;
    public static final int Channel_2 = 2;
}


ENGINEERING_PREFIX      : 'E' | 'P' | 'T' | 'G' | 'M' | 'k' | 'm' | 'u' | 'n' | 'p' | 'f' | 'a';
ENGINEERING_UNIT        : 'A' | 'Cel' | 'F' | 'H' | 'Hz' | 'm' | 'Ohm' | 's' | 'W' | 'V';
DIGIT                   :   [0-9];
fragment UPPER_CASE_LETTER       :   [A-Z];
fragment LOWER_CASE_LETTER       :   [a-z];
fragment UNDERLINE               :   '_';
WHITESPACE_CHARACTER    :   ' '|'\t'|'\n';
SPECIAL_WORD            : '@';
SPECIAL_CHARACTER       :   '!'|'@'|'#'|'$'|'%'|'^'|'&'|'*'|'('|')'|'-'|'+'|'='|'|'|'`'|'~'
                        |   '{'|'['|'}'|']'|':'|';'|'\''|','|'<'|'.'|'>'|'?'|'\\';
DOUBLE_QUOTATION        :   '"';




LETTER                  : UPPER_CASE_LETTER|LOWER_CASE_LETTER;
SIMPLE_CHARACTER        : LETTER|DIGIT|UNDERLINE;
LETTER_OR_DIGIT         : LETTER|DIGIT;
LETTER_OR_UNDERLINE     : LETTER|UNDERLINE;


//HEXCHARS                : (DIGIT|'a'|'A'|'b'|'B'|'c'|'C'|'d'|'D'|'e'|'E'|'f'|'F')+;
WORDS                   : (LETTER_OR_UNDERLINE+ SIMPLE_CHARACTER+) ;
INTEGER                 : DIGIT+;
FLOAT                   : DIGIT+ '.' DIGIT+;
VALUE                   : INTEGER|FLOAT;


SIGNED_INTEGER          : INTEGER|'-'INTEGER;
DECIMAL                 : SIGNED_INTEGER
                        | SIGNED_INTEGER '.' INTEGER
                        | SIGNED_INTEGER 'e' SIGNED_INTEGER
                        | SIGNED_INTEGER '.' INTEGER 'e' SIGNED_INTEGER
                        ;

TIME_DEF                : ENGINEERING_PREFIX ENGINEERING_UNIT;
REF_NAME                : VALUE|DECIMAL ENGINEERING_PREFIX? ENGINEERING_UNIT;
WFC_WORDS               : LETTER_OR_DIGIT+;


NAME_STRING             : DOUBLE_QUOTATION WORDS DOUBLE_QUOTATION;
STRING                  : DOUBLE_QUOTATION .*? DOUBLE_QUOTATION;


//IDENTIFIER              : (IDENTIFIER_SEGMENT|'.' IDENTIFIER_SEGMENT)+ ->channel(1);
//IDENTIFIER_SEGMENT      : SIMPLE_IDENTIFIER|ESCAPED_IDENTIFIER;
//
//

//
//SIMPLE_CHARACTERS       : SIMPLE_CHARACTER*;
//SIMPLE_IDENTIFIER       : LETTER_OR_UNDERLINE SIMPLE_CHARACTERS;
//
//ESCAPED_CHARACTER       : SIMPLE_CHARACTER|SPECIAL_CHARACTER|WHITESPACE_CHARACTER;
//ESCAPED_CHARACTERS      : ESCAPED_CHARACTER ESCAPED_CHARACTERS|ESCAPED_CHARACTER;
//ESCAPED_IDENTIFIER      : '"' ESCAPED_CHARACTERS '"';



//STRING                  : '"' .*? '"';
